3 ...\PTVR_Researchers\Python_Scripts\Demos\Pointing\reticle.py
6 Show the simplest way of creating a standard PTVR
8 In this demo, the reticle is head-contingent (i.e. it moves with
9 your head) - this is also known as being head-controlled.
12 Note 1 : By default, the reticle is White. This is perfect when the
13 (average) background is dark (as in the present demo.
14 If the (average) background were luminous, you could
15 set the reticle's color to black
16 (cf. 'color 'parameter in ReticleImageFromDrawing() )
18 Note 2: If the background is dark in some locations and bright in other
19 locations, the best choice is to use the BICOLOR RETICLE by
20 setting the 'two_colors' parameter to True in ReticleImageFromDrawing().
21 The BICOLOR reticle is made of two contours (white and black),
22 which makes it ideal for a background containing dark and bright patches
25 To illustrate the use of the BICOLOR RETICLE, have a look at the
26 "reticle_on_different_bckgnd_colors.py" demo.
28 Note 3: The reticle belongs to the PTVR category called "flat cursors".
39 my_contingency = ImageContingency.HEADSET
45 my_scene = VisualScene (skybox =
"Night")
48 reticle_2D_image = RG.ReticleImageFromDrawing()
56 image = reticle_2D_image,
57 contingency_type = my_contingency)
59 my_scene.place_contingent_cursor(my_reticle)
61 my_world.add_scene(my_scene)
64 if __name__ ==
"__main__":
def LaunchThe3DWorld(jsonFileCategory="Externals")